package com.action.ui.activity;

import android.widget.EditText;

import com.action.childbase.ChildBaseActivity;
import com.action.service.pressenter.RedpakcetPressenter;
import com.action.utils.SingleClick;
import com.base.app_core.service.user.model.User;
import com.tencent.map.lib.util.StringUtil;
import com.xinglai.yun.R;

import javax.inject.Inject;

import butterknife.BindView;
import butterknife.OnClick;

public class AdRedPacketDetailNew extends ChildBaseActivity<RedpakcetPressenter> {
    @BindView(R.id.et_commemnt)
    EditText etCommemnt;

    @Inject
    User user;
    String sn;
    @Override
    protected int getLayoutId() {
        return R.layout.activity_ad_red_packet_detail_new;
    }

    @Override
    protected void initView() {
        super.initView();
    }
    @OnClick(R.id.post_comment)
    public void onClickPostComment() {
        if (SingleClick.isSingle()) {
            showProgress();
            String comment = etCommemnt.getText().toString();
            if (StringUtil.isEmpty(comment)) {
                showToast("请输入评论内容");
                return;
            }

            if (null != mPresenter) {
                showProgress();
                mPresenter.postComment(comment, sn);
            }
            hideInputSoft(etCommemnt);
        }
    }
}
